<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
    <!-- 微信登录 -->
    <script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js" type="text/javascript"></script>
</head>
<body>

<div id="login_container"></div>
<script>
    //参考文档：微信开放平台》资源中心》网站应用》
    //https://www.cnblogs.com/yzw23333/p/8036765.html
    var obj = new WxLogin({
        self_redirect: false,     //true:在iframe里进行跳转，false：在window里跳转
        id: "login_container",    //显示二维码容器的id
        appid: "",      //微信程序id
        scope: "snsapi_login",      //应用作用域
        redirect_uri: "main",   //重定向地址
        state: "",      //保持和请求回调状态
        style: "",      //底色类型，有black和white
        href: ""
    });

</script>
</body>
</html>